package com.hsq.ndmall.wx.controller;

import com.hsq.ndmall.common.utils.R;
import com.hsq.ndmall.wx.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 黄四清
 * @version 1.0.0
 * @ClassName HomeController.java
 * @Description TODO 首页
 * @createTime 2021年08月11日 22:50:00
 */
@RestController
@RequestMapping("/wx/home")
public class HomeController {

    @Autowired
    private IndexService indexServie;
    @GetMapping("/index")
    public R index(){
        Map indexMap = indexServie.findIndexData();
        return R.ok().put("data",indexMap);
    }
}
